package day20171222;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by JAVA on 2017/12/29.
 */
public class StringTest {

public static void main(String[] args) {
    //正则表达式，模式匹配
    //d:digit
    Matcher matcher= Pattern.compile("信本1班(\\d+)陈来")
            .matcher("面向对象的设计java2016级信本1班16061011201陈来作业1.docx");
    while(matcher.find()){
        System.out.println(matcher.group(0));
    }
}
}
